package com.example.login.entity

import com.blankj.utilcode.util.GsonUtils
import com.example.network.BaseResponse
import com.google.gson.Gson

/**
 * {
 *     "msg": "登录成功",
 *     "values": {
 *         "pId": 1,
 *         "time": "1582523446",
 *         "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxIiwiZXhwIjozMTY1MDQ2OTk2LCJpYXQiOjE1ODI1MjM0OTh9.1RN4yUMMU6zGrZkKs3LiZtu7kn4FOs_jVwa9eUNHq7g",
 *         "uId": 1,
 *         "uName": "zxy",
 *         "uPwd": "123456"
 *     },
 *     "statuesCode": "200",
 *     "home": "http://172.81.227.127:8066/index.html"
 * }
 * */
data class LoginResultEntity (
    val msg:String,
    val statuesCode:String,
    val values :String,
    val home :String
):BaseResponse(){
    fun getValues():LoginValues{
        return GsonUtils.fromJson(values,LoginValues::class.java)
    }
}

data class LoginValues(
    val pId: Int,
    val time: String,
    val token: String,
    val uId: Int,
    val uName: String,
    val uPwd: String
)